package com.alibaba.taolele.service;

import com.alibaba.taolele.dao.LoginMapper;
import com.alibaba.taolele.datamodel.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/10/25.
 */
@Service
public class UserService {
    @Autowired
    private LoginMapper loginMapper;

    public Boolean get(User user) {
        User user1 = loginMapper.selectOneUser(user);
        if (user1 == null) {
            return Boolean.FALSE;
        }
        return Boolean.TRUE;
    }
    public  Boolean register(User user){
        int result=loginMapper.add(user);
        if(result==1){
            return true;
        }
        return false;
    }

}
